#include <stdio.h>

int main()
{
	int i = 0;
	int m = 0;
	int n = 0;
	int arr1[1000] = { 0 };
	int arr2[1000] = { 0 };
	scanf("%d", &n);
	for (i = 0; i < n; i++)
	{
		scanf("%d", &m);
		arr1[i] = m;
	}
	for (i = 0; i < n; i++)
	{
		scanf("%d", &m);
		arr2[i] = m;
	}
	m = 0;
	for (i = 0; i < n; i++)
	{
		arr1[i] *= arr2[i];
		m += arr1[i];
	}
	printf("%d", m);

	return 0;
}
